<!--
------------------( LICENSE                                  )------------------
Copyright (c) 2014-2025 Beartype authors.
See "LICENSE" for further details.

------------------( SYNOPSIS                                 )------------------
PyData Sphinx theme-specific empty left sidebar template kludge.

------------------( DESCRIPTION                              )------------------
This template forces this theme to populate the left sidebar with headings
defined by the global ":toctree:" directive in our root "index.rst" document.
For unknown reasons, this theme omits these headings by default and thus only
uselessly displays a blank left sidebar.

------------------( SEE ALSO                                 )------------------
* Pull request (PR) by @choldgraf that resolved this in the exact same way as
  below, which theme maintainers sadly closed without merging:
  https://github.com/pydata/pydata-sphinx-theme/pull/536
* Commentary by @kinow summarizing @choldgraf's changeset for use in downstream
  projects such as this, which the template below is more-or-less shamelessly
  copy-pasted from:
  https://github.com/pydata/pydata-sphinx-theme/issues/90#issuecomment-1181250562
* Open issue discussing this boilerplate pablum. Naturally, nothing was done:
  https://github.com/pydata/pydata-sphinx-theme/issues/221
  Fascinatingly, from the same issue:
  * Theme load @jorisvandenbossche claims this is desirable behaviour, because:
    "That is because for the root index.html, this TOC is actually already
    shown, but in the header. This theme basically tries to look at the global
    toctree of the full sphinx site, and the puts the first level in the top
    header bar, and the second (+ potentially third) level in the left sidebar."
    Of course, when only the first level exists, the left sidebar is empty. Ugh!
  * @holoviews lead @maximlt leverages the exact same template on the official
    Holoviews site, but hilariously admits that he forgot how he did it:
    "I would actually like to replicate that on each one of our sites, the
    problem is that I really have no clue how the TOC ended up being displayed
    in the sidebar on this site"
-->

<!-- FIXME: Submit a new upstream issue with this theme requesting official
     support for enabling this functionality via a new theme-specific option in
     "copy.py". Basically *ALL* downstream projects using this theme currently
     appear to copy-paste this template into their Sphinx trees.
-->
<nav
 class="bd-links d-none d-md-block"
 id="bd-docs-nav"
 aria-label="{{ _('Main navigation') }}"
>
  <div class="bd-toc-item active">
    {{ generate_nav_html("sidebar",
                         startdepth=0,
                         maxdepth=theme_navigation_depth|int,
                         collapse=theme_collapse_navigation|tobool,
                         includehidden=True,
                         titles_only=True) }}
  </div>
<!--
                         show_nav_level=theme_show_nav_level|int,
-->
</nav>
